/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tp2Principal;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author Usager
 */
public class Fenetre extends JFrame {

    JPanel pnlPrincipal;
    JPanel pnlInfo;
    Damier pnlJeu;
    JPanel pnlStat;
    JLabel lblCourant;
    JLabel lblPoint1;
    JLabel lblPoint2;
    JLabel lblGagnant;
    JCheckBox chkSuper;
    JButton btnAbandonner;

    Fenetre fenetre;
    /*int point1=2;
    int point2=2;*/
     

    public Fenetre() {
        super("Super Redd");

        fenetre = this;

        pnlPrincipal = new JPanel();
        pnlPrincipal.setLayout(new BorderLayout());
        pnlInfo = new JPanel();
        pnlStat = new JPanel();

        lblCourant = new JLabel("C'est le tour du joueur 1."); //initialisation
        chkSuper=new JCheckBox("Super Redd");
        chkSuper.setEnabled(false);
        lblGagnant = new JLabel();
        lblPoint1 = new JLabel("Pions rouges: 2");
        lblPoint2 = new JLabel("Pions gris: 2");
        btnAbandonner=new JButton("Abandonner");

        pnlInfo.add(lblCourant);
        pnlInfo.add(chkSuper);
        pnlInfo.add(lblGagnant);
        pnlStat.add(lblPoint1);
        pnlStat.add(lblPoint2);
        pnlStat.add(btnAbandonner);

        pnlJeu = new Damier(fenetre);
        pnlJeu.setPreferredSize(new Dimension(400, 400));

        pnlPrincipal.add(pnlInfo, BorderLayout.NORTH);
        pnlPrincipal.add(pnlJeu, BorderLayout.CENTER);
        pnlPrincipal.add(pnlStat, BorderLayout.SOUTH);

        this.add(pnlPrincipal);
        this.pack();

        MenuBarre menu1=new MenuBarre(pnlJeu);
        this.setMenuBar(menu1);

        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
    }
   
}
